home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 25
/
CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso
/
CUCD
/
WWW
/
http
/
www.cu-amiga.co.uk
/
features
/
c-tutorial
/
Part-1.lzx
/
Part-1
/
basics2.c
< prev
next >
Wrap
C/C++ Source or Header
|
2005-05-01
|
1KB
|
47 lines
#include<exec/libraries.h>
#include<intuition/intuition.h>
#include<utility/tagitem.h>
#include<graphics/text.h>
#include<string.h>
#include<clib/exec_protos.h>
#include<clib/graphics_protos.h>
#include<clib/intuition_protos.h>
struct Library* GfxBase;
struct Library* IntuitionBase;
void main()
{
GfxBase = OpenLibrary("graphics.library",36);
if(GfxBase != NULL)
{
IntuitionBase = OpenLibrary("intuition.library",36);
if(IntuitionBase != NULL)
{
struct Window* win;
win = OpenWindowTags(NULL,
WA_Left, 20,
WA_Top, 20,
WA_Width, 200,
WA_Height, 100,
WA_Flags, WFLG_CLOSEGADGET,
WA_IDCMP, IDCMP_CLOSEWINDOW,
TAG_DONE, 0);
if(win != NULL)
{
char* text;
text = "Hello World!";
SetAPen(win->RPort, 1);
Move(win->RPort, 10, 60);
Text(win->RPort, text, strlen(text));
WaitPort(win->UserPort);
CloseWindow(win);
}
CloseLibrary(IntuitionBase);
}
CloseLibrary(GfxBase);
}
}